--使用方法：直接粘贴到模组环境 worldset_playerspd为上限 6是基础移速

local worldset_playerspd = 6 * 2
AddComponentPostInit("locomotor", function(LocoMotor, owner)
    if owner == nil or not owner:HasTag("player") then return end 

    local _SetMotorSpeed = LocoMotor.SetMotorSpeed
    function LocoMotor:SetMotorSpeed(speed, ...)
        speed = math.min(speed, worldset_playerspd)
        return _SetMotorSpeed(self, speed, ...)
    end
end)